﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;

namespace NIIT.Domain
{
    public class RegisteredInfoConstant
    {
        public const string TABLE_NAME = "REGISTERED_INFO";

        public const string REGISTERED_ID = "RegisteredID";
        public const string FULL_NAME = "FullName";
        public const string BIRTH_DAY = "BirthDay";
        public const string EMAIL = "Email";
        public const string ADDRESS = "Address";
        public const string PHONE_NUMBER="PhoneNumber";
        public const string HOW_KNOW_NIIT = "HowKnowNIIT";
        public const string COURSE_ID = "CourseID";
    }
    [Table(Name=RegisteredInfoConstant.TABLE_NAME)]
    public class RegisteredInfo:BaseDomain<RegisteredInfo>,ICommonFunction<RegisteredInfo>
    {
        #region PrivatePlace
        private int _RegisteredID;

        private string _FullName;

        private System.Nullable<System.DateTime> _BirthDay;

        private string _Email;

        private string _Address;

        private string _PhoneNumber;

        private string _HowKnowNIIT;

        private int _CourseID;
        private System.Data.Linq.Binary _TIME_STAMP;
        #endregion
        #region Public Place
        [Column(Name=RegisteredInfoConstant.REGISTERED_ID,Storage = "_RegisteredID", AutoSync = AutoSync.OnInsert, DbType = "Int NOT NULL IDENTITY", IsPrimaryKey = true, IsDbGenerated = true)]
        public int RegisteredID
        {
            get
            {
                return this._RegisteredID;
            }
            set
            {
                if ((this._RegisteredID != value))
                {
                    
                    this._RegisteredID = value;
                   
                }
            }
        }

        [Column(Name = RegisteredInfoConstant.FULL_NAME, Storage = "_FullName", DbType = "NVarChar(100) NOT NULL", CanBeNull = false)]
        public string FullName
        {
            get
            {
                return this._FullName;
            }
            set
            {
                if ((this._FullName != value))
                {
                   
                    this._FullName = value;
                   
                }
            }
        }

        [Column(Name = RegisteredInfoConstant.BIRTH_DAY, Storage = "_BirthDay", DbType = "DateTime")]
        public System.Nullable<System.DateTime> BirthDay
        {
            get
            {
                return this._BirthDay;
            }
            set
            {
                if ((this._BirthDay != value))
                {
                   
                    this._BirthDay = value;
                   
                }
            }
        }

        [Column(Name = RegisteredInfoConstant.EMAIL,Storage = "_Email", DbType = "NVarChar(100) NOT NULL", CanBeNull = false)]
        public string Email
        {
            get
            {
                return this._Email;
            }
            set
            {
                if ((this._Email != value))
                {
                   
                    this._Email = value;
                   
                }
            }
        }

        [Column(Name = RegisteredInfoConstant.ADDRESS,Storage = "_Address", DbType = "NVarChar(1000) NOT NULL", CanBeNull = false)]
        public string Address
        {
            get
            {
                return this._Address;
            }
            set
            {
                if ((this._Address != value))
                {
                   
                    this._Address = value;
                   
                }
            }
        }

        [Column(Name = RegisteredInfoConstant.PHONE_NUMBER,Storage = "_PhoneNumber", DbType = "NVarChar(50) NOT NULL", CanBeNull = false)]
        public string PhoneNumber
        {
            get
            {
                return this._PhoneNumber;
            }
            set
            {
                if ((this._PhoneNumber != value))
                {
                   
                    this._PhoneNumber = value;
                   
                }
            }
        }

        [Column(Name = RegisteredInfoConstant.HOW_KNOW_NIIT,Storage = "_HowKnowNIIT", DbType = "NVarChar(100)")]
        public string HowKnowNIIT
        {
            get
            {
                return this._HowKnowNIIT;
            }
            set
            {
                if ((this._HowKnowNIIT != value))
                {
                   
                    this._HowKnowNIIT = value;
                   
                }
            }
        }

        [Column(Name = RegisteredInfoConstant.COURSE_ID,Storage = "_CourseID", DbType = "Int NOT NULL")]
        public int CourseID
        {
            get
            {
                return this._CourseID;
            }
            set
            {
                if ((this._CourseID != value))
                {
                   
                    this._CourseID = value;
                   
                }
            }
        }
        [Column(Storage = "_TIME_STAMP", AutoSync = AutoSync.Always, DbType = "rowversion NOT NULL", CanBeNull = false, IsDbGenerated = true, IsVersion = true, UpdateCheck = UpdateCheck.Never)]
        public System.Data.Linq.Binary TIME_STAMP
        {
            get
            {
                return this._TIME_STAMP;
            }
            set
            {
                if ((this._TIME_STAMP != value))
                {

                    this._TIME_STAMP = value;

                }
            }
        }
        #endregion
        public RegisteredInfo GetByPrimaryKey()
        {
            throw new NotImplementedException();
        }
    }
}
